import request from '@/utils/request'

// 根据条码获取库存信息
export function infoByBarcode(barcode) {
  return request({
    url: '/storehouse/stock/infoByBarcode/'+barcode,
    method: 'get',
  })
}
// 根据条码获取待检仓库存信息
export function waitStockInfoByBarcode(barcode) {
  return request({
    url: '/inOutStock/stockCheck/getByBarcode/'+barcode,
    method: 'get',
  })
}

// 获取条码信息
export function getInStockBarcodeInfo(barcode) {
  return request({
    url: '/storehouse/barcode/getInStockBarcodeInfo/'+barcode,
    method: 'get',
  })
}

// 根据库位获取库存信息
export function infoByLocationNo(locationNo) {
  return request({
    url: '/storehouse/stock/infoByLocationNo/'+locationNo,
    method: 'get',
  })
}

// 根据物料编号获取物料信息
export function getByProductNo(productNo) {
  return request({
    url: '/basic/product/getByProductNo/'+productNo,
    method: 'get',
  })
}

// 获取区域
export function getArea(params) {
  return request({
    url: '/basic/area/list',
    method: 'get',
	params
  })
}

// 获取仓库
export function getStorehouse(params) {
  return request({
    url: '/basic/storehouse/list',
    method: 'get',
	params
  })
}


// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
  return request({
    url: '/system/dict/data/type/' + dictType,
    method: 'get'
  })
}


// 新增条码记录
export function saveBarcode(data) {
  return request({
    url: '/storehouse/barcode',
    method: 'post',
	data
  })
}
